<%@ page language="java" contentType="text/html;charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.hzqy.web.vo.EpgInfoVo"%>
<%@ page import="com.hzqy.web.login.SessionKey"%>
<%@ page import="com.hzqy.commons.utils.SystemConfigUtils" %> 
<%
String pageUrl=String.valueOf(session.getAttribute(SessionKey.SESSION_EPG_URL));
String cloudTwoPlaneUrl = SystemConfigUtils.getSysConfig(SessionKey.SESSION_SYSTEM_CONFIG.cloud_two_plane_url.getKey());
String serverid=String.valueOf(session.getAttribute(SessionKey.SESSION_SERVERID));
String epg_info=String.valueOf(session.getAttribute(SessionKey.SESSION_EPG_INFO));
String current_partner = (String)session.getAttribute(SessionKey.SESSION_PARTNER_ID);//当前平台 HW：华为, UT：UT2X, HW3:华为3.0, ZTE：中兴 
String order_url = SystemConfigUtils.getSysConfig(SessionKey.SESSION_SYSTEM_CONFIG.server_order_path_url.getKey());//订购地址
String bill_url = SystemConfigUtils.getSysConfig(SessionKey.SESSION_SYSTEM_CONFIG.server_order_bill_url.getKey());//账单地址
String resolution=String.valueOf(session.getAttribute(SessionKey.SESSION_EPG_RESOLUTION));
String area_Id=String.valueOf(session.getAttribute(SessionKey.SESSION_AREA));

/*考虑到百视通的播放情况，取CODE值的RTSP地址会出问题，故需要统一到广电大网EPG分组中获取，所以需要对pageUrl进行拼接处理--开始【暂时为支持广场舞添加的临时变量——后期可以考虑删除】*/
/* 注：删除时需要调整小窗口播放中配置 */
 	String page_url_gd_bestv="";
	String play_code_give_url=pageUrl.substring(0,pageUrl.lastIndexOf("/jsp/")+5)+"gdhdpublic/vis_to_page.jsp";;//播放地址获取地址，标清存在无法获取地址情况，直接获取高清地址
    if(pageUrl.indexOf("/iptvepg/")>0) { //中兴平台
    	 if(resolution == "2" ||"2".equals( resolution)){//高清
    		 page_url_gd_bestv=pageUrl.substring(0,pageUrl.lastIndexOf("/iptvepg/")+9)+"frame1030/vis_to_page.jsp";
    	 }else{//标清
    		 page_url_gd_bestv=pageUrl.substring(0,pageUrl.lastIndexOf("/iptvepg/")+9)+"frame1028/epg/vis_to_page.jsp";
    	 }
	} else { //华为平台  判定条件/jsp/
		 
		 if(resolution == "2" || "2".equals( resolution)){//高清
			 page_url_gd_bestv=pageUrl.substring(0,pageUrl.lastIndexOf("/jsp/")+5)+"gdhdpublic/en/vis_to_page.jsp";
		 }else{//标清
			 page_url_gd_bestv=pageUrl.substring(0,pageUrl.lastIndexOf("/jsp/")+5)+"gdpublic/epg/vis_to_page.jsp";
    	 }
	}
   String jumpEpgUrl=(String)session.getAttribute(SessionKey.SESSION_JUMP_EPG_URL);//
   if(jumpEpgUrl!=null){//跳转回epg地址封装——针对行业跳转
	   if("HW".equals(current_partner)||"HW"==current_partner){
		   pageUrl=pageUrl.substring(0,pageUrl.lastIndexOf("/"))+"/jumpTo.jsp";   
	   }
	   if(pageUrl.indexOf("/iptvepg/")>0) { 
		   page_url_gd_bestv=pageUrl.substring(0,pageUrl.lastIndexOf("/iptvepg/")+9)+jumpEpgUrl;
		   pageUrl=page_url_gd_bestv;
	   }else{
		   page_url_gd_bestv=pageUrl.substring(0,pageUrl.lastIndexOf("/jsp/")+5)+jumpEpgUrl;
	   }
   }
/*考虑到百视通的播放情况，取CODE值的RTSP地址会出问题，故需要统一到广电大网EPG分组中获取，所以需要对pageUrl进行拼接处理--结束*/
%>
<script type="text/javascript">
var ueditor_old_url_path="";
var ueditor_new_url_path="";
var ueditor_old_url_path_reg = new RegExp(ueditor_old_url_path, "g" )
function changeUeditorPath(desc_text_content){
	return desc_text_content.replace(ueditor_old_url_path_reg,ueditor_new_url_path);
}
function go_to_watch_tv(){
	window.location.href="<%=cloudTwoPlaneUrl+"commons/jump_epg.jsp"%>";
}
</script>

<%@ include file="wl_commons.jsp"%>
